package com.cookor.poi.modules.mx.entity;

import com.cookor.poi.common.persistence.DataEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

public class TMxOrder extends DataEntity<TMxOrder> {
  private static final long serialVersionUID = 1L;
  
  private String userName;
  
  private String mobile;
  
  private String userType;
  
  private String orderNo;
  
  private Date orderDate;
  
  public TMxOrder() {}
  
  public TMxOrder(String id) {
    super(id);
  }
  
  @Length(min = 1, max = 64, message = "客户姓名长度必须介于 1 和 64 之间")
  public String getUserName() {
    return this.userName;
  }
  
  public void setUserName(String userName) {
    this.userName = userName;
  }
  
  @Length(min = 1, max = 64, message = "手机号长度必须介于 1 和 64 之间")
  public String getMobile() {
    return this.mobile;
  }
  
  public void setMobile(String mobile) {
    this.mobile = mobile;
  }
  
  @Length(min = 1, max = 64, message = "用户类型长度必须介于 1 和 64 之间")
  public String getUserType() {
    return this.userType;
  }
  
  public void setUserType(String userType) {
    this.userType = userType;
  }
  
  @Length(min = 1, max = 128, message = "订单号长度必须介于 1 和 128 之间")
  public String getOrderNo() {
    return this.orderNo;
  }
  
  public void setOrderNo(String orderNo) {
    this.orderNo = orderNo;
  }
  
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @NotNull(message = "订单时间不能为空")
  public Date getOrderDate() {
    return this.orderDate;
  }
  
  public void setOrderDate(Date orderDate) {
    this.orderDate = orderDate;
  }
}
